// 样式文件

// @default-color: #777;
// @active-color: #3e8bf2;
// @border-color: #dddddd;


:root {
    --defaultColor: #686868;
    --blackColor: #333;
    --activeColor: #3e8bf2;
    --borderColor: #dddddd;
}


::selection {
    // background-color: transparent;
}

ul {
    list-style: none;
}

.moving {
    // 拖放移动中
    // outline-width: 0;
    min-height: 25px;
    box-sizing: border-box;
    overflow: hidden;
    font-size: 14px;
    padding: 0 !important;
    position: relative;
    border: 1px dashed var(--activeColor);
    // outline: 1px dashed var(--activeColor);

    // &::before {
    //     content: '';
    //     height: 30px;
    //     width: 100%;
    //     // background: #2188E2;
    //     position: absolute;
    //     top: 0;
    //     right: 0;
    // }
}


.options-panel {
    // padding: 15px;

}

.pt0 {
    padding-top: 0 !important;
}

.panel-from {
    // border: 1px solid red;

    .panel-inner-box {
        border: 1px solid var(--borderColor);
        padding: 12px 12px 0;
        margin-bottom: 12px;
        border-radius: 6px;
        background-color: #fafafa;

        .panel-form-item {
            margin-bottom: 10px !important;

            .item-label {
                width: 65px;
            }
        }
    }

    .panel-form-item {
        display: flex;
        align-items: center;
        margin-bottom: 15px;

        &.check {
            margin-bottom: 18px;
        }


        .item-label {
            width: 80px;
            font-size: 12px;
            color: #333;
            display: flex;
            align-items: center;
        }

        .item-input {
            flex: 1;
            // display: flex;
            position: relative;
            align-items: center;

            &.flex {
                display: flex;
                justify-content: center;
                align-items: center;
            }
        }


    }

}

.tips-icon {
    margin-left: 5px;
    font-size: 14px;
    cursor: pointer;
    color: #7c7c7c;

    &:hover {
        color: #333;
    }
}

.blod-font {
    font-weight: bold;
}

.ant-input-number-group .ant-input-number-group-addon,
.ant-input-affix-wrapper,
.ant-input-number,
.ant-select-single .ant-select-selector,
.ant-input {
    // border-radius: 0;
}

.small-text {
    font-size: 12px;
}

.input-color-style {
    width: 100%;
    height: 32px;
    padding: 3px;
    background-color: #FFF;
}

.custom-divider {
    font-size: 14px;
}

.ant-divider-horizontal.ant-divider-with-text-left::before {
    display: none;
}

.panel-from .ant-divider-horizontal.ant-divider-with-text {
    font-size: 13px;
}

.panel-from .ant-divider .ant-divider-inner-text {
    padding: 0 1em 0 0;
}

.dragArea {
    position: relative;
    min-height: 30px;
    height: 100%;
    border: 1px dashed var(--borderColor);
}

.dragColArea {
    position: relative;
    min-height: 30px;
    height: 100%;
    border: 1px dashed var(--borderColor);
    background-color: #FFF;
}

.options-panel {
    padding: 0 15px;
}


.custom-modal-wrap {

    &.full {
        .ant-modal {
            max-width: 100%;
            top: 0;
            padding-bottom: 0;
            margin: 0;
        }

        .ant-modal-content {
            display: flex;
            flex-direction: column;
            height: 100vh;
            border-radius: 0;
            padding: 0;

            .ant-modal-close {
                top: 12px;
            }

            .ant-modal-body {
                flex: 1;
                overflow: auto;
            }

            .ant-modal-header {
                padding: 10px 20px;
                border-radius: 0;
                margin-bottom: 0;
                border-bottom: 1px solid var(--borderColor);
            }
        }
    }

    &.history {
        .ant-modal-content {
            .ant-modal-body {
                min-height: 100px;
                max-height: 80vh;
            }
        }
    }

    &.scriptEditor {
        .ant-modal-content {
            .ant-modal-body {
                height: calc(100vh - 188px);
            }
        }
    }




    .ant-modal-content {
        // border-radius: 0;
        padding: 0;

        .ant-modal-close {
            top: 12px;
        }

        .ant-modal-header {
            padding: 10px 20px;
            // border-radius: 0;
            margin-bottom: 0;
            border-bottom: 1px solid var(--borderColor);
        }

        .ant-modal-body {
            // min-height: 100px;
            // max-height: 80vh;
            overflow: auto;
        }

        .ant-modal-footer {
            margin-top: 0;
            border-top: 1px solid var(--borderColor);
            padding: 10px 20px;
        }
    }
}



.small-modal-wrap {
    .ant-modal-content {
        border-radius: 0;
        padding: 0;

        .ant-modal-close {
            top: 7px;
            right: 10px;
        }

        .ant-modal-header {
            padding: 10px;
            border-radius: 0;
            margin-bottom: 0;
            // border-bottom: 1px solid var(--borderColor);

            .ant-modal-title {
                font-size: 14px;
                font-weight: 400;
            }
        }

        .ant-modal-body {
            min-height: 100px;
        }

        .ant-modal-footer {
            margin-top: 0;
            border-top: 1px solid var(--borderColor);
            padding: 10px 20px;
        }
    }
}

.ant-collapse {
    background-color: #FAFAFA;
}

.option-list {
    padding: 0;
    margin: 0;

    .option-lsit-item {
        display: flex;
        align-items: center;
        margin-bottom: 8px;

        .option-handle {
            // margin-right: 5px;
            cursor: move;
        }

        .add-child-btn,
        .delete-btn {
            opacity: 0.5;
            transition: all 0.2s;
            margin-left: 5px;

            &:hover {
                opacity: 1;
            }
        }

        .ant-input {
            margin-left: 5px;
        }
    }

    .option-list-child-item {
        padding-left: 20px;
    }
}

.component-item-icon {
    transition: all 0.2s ease;
    font-size: 18px;
    margin-bottom: 5px;
}

.tool-item-icon {
    font-size: 22px;
    margin-bottom: 8px;
}

.page-header {
    width: 100%;
    height: 50px;
    // border-top: 1px solid var(--borderColor);
    border-bottom: 1px solid var(--borderColor);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 15px;

    .page-title {
        font-size: 15px;
        color: #676767;

        .page-title-icon {
            // font-size: 18px;
            width: 30px;
            margin-right: 3px;
            position: relative;
            top: -2px;
        }
    }

    .page-header-tool {
        // max-width: 1100px;
        width: 60%;
        height: 70%;
        background-color: #f5f5f5;
        border: 1px solid var(--borderColor);
        border-radius: 50px;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0 18px;

        .tool-left {
            height: 100%;
        }

        .tool-list {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
            height: 100%;
            width: auto;
            color: #333;

            li {
                height: 100%;
                padding: 8px;
                display: flex;
                justify-content: center;
                align-items: center;
                font-size: 14px;
                cursor: pointer;

                &:not(.disabled):hover {
                    background-color: #e2e2e2;
                }

                &.active {
                    color: var(--activeColor);
                }

                &.disabled {
                    &:hover {
                        cursor: not-allowed;
                    }

                    .tool-icon {
                        color: #b4b4b4;
                    }
                }
            }
        }

        .tool-right {
            // width: 200px;
            height: 100%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
    }

    .page-header-btn {
        button {
            margin-left: 8px;
        }
    }
}

.shape-class {
    padding: 0;

    .ant-tooltip-arrow {
        display: none;
    }

    .ant-tooltip-inner {
        width: 282px;
        background-color: #FFF;
        overflow: auto;
        border: 1px solid var(--borderColor);
    }
}

.setting-modal-class {
    .ant-tooltip-arrow {
        display: none;
    }

    .ant-tooltip-inner {
        width: 410px;
        background-color: #FFF;
        overflow: auto;
        border: 1px solid var(--borderColor);
    }
}




.handle {
    position: absolute;
    width: 6px;
    height: 6px;
    z-index: 1;
    border: 1px solid var(--activeColor);
    background-color: #fff;

    &.nw {
        top: -4px;
        left: -4px;
        cursor: nw-resize;
    }

    &.n {
        top: -4px;
        left: 50%;
        transform: translateX(-50%);
        cursor: n-resize;
    }

    &.ne {
        top: -4px;
        right: -4px;
        cursor: ne-resize;
    }

    &.w {
        top: 50%;
        transform: translateY(-50%);
        left: -4px;
        cursor: w-resize;
    }

    &.e {
        top: 50%;
        transform: translateY(-50%);
        right: -4px;
        cursor: e-resize;
    }

    &.sw {
        bottom: -4px;
        left: -4px;
        cursor: sw-resize;
    }

    &.s {
        bottom: -4px;
        left: 50%;
        transform: translateX(-50%);
        cursor: s-resize;
    }

    &.se {
        bottom: -4px;
        right: -4px;
        cursor: se-resize;
    }
}

.resize-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 1px dashed var(--activeColor);
    pointer-events: none;
}